Screen.BIN Copyright (C) Paul B. Powers, August 18, 1990 When distributing the screen.bin file this text file, readme.scr is to be distributed along with it. This software is being distributed as Freeware and no payment is charged for its use or distribution. The author has made every available attempt to test this piece of software. However, the author cannot be held responsible for any damage, loss or other mishaps as a result of the usage of this software. The bin file takes two parameters. the bin file can be called with the call command or function - Call or Call() as follows; load screen * either * call screen with , * or * memvar = call("screen",","") release module screen parameter1 has the following option; "W" or "w" - which will write the screen characters and attributes to the filename specified in parameter2. Neither write mode will overwrite a file. "W-" or "w-" - which will write only the screen characters to the file spoecified in parameter2. Neither write mode will overwrite a file. "A" or "a" - which will only append the screen characters to the filename specified in parameter2. The append mode will only concatenate the characters to the end of the file specified in parameter2. "R" or "r" - which will read the file and print it on the screen, whether the bin file prints only characters or both characters and color attributes depends on the size of the source file to be read (see chart below). specified by parameter 2 is the drive:\path\filename of the file that is to be read, written, or appended. You can also use a text editor to make the text file to be read in. To do this make sure you use only spaces, don't use any tabs to fill in blank spaces. Each row on the screen is expected to be 81 characters long. The first 80 characters are expected to be text characters (i.e. no tabs, use the spacebar to create blank spaces), on column 81 you are expected to press the enter key. If you are in a 25-line mode (Mono, CGA, EGA or VGA) make sure the text file has 25 lines. If you are in a 43-line mode (EGA) or a 50-line mode (VGA) make sure the text file has 43 or 50 lines in it, respectively. This file format is designed so that a text editor will be to read a text file that is created by screen.bin with the "w-" or the "a" option. To see the type of file screen.bin creates creates in general see the diagram below. For writing your own text files to use with screen.bin the format is as follows: text file 1 80 81 |------------------------------------------------------|/ | | | | | characters go here | | | | | |------------------------------------------------------| | | | | | (optional) attributes go here, | | not used with the "w-" and "a" modes | | | |------------------------------------------------------| The "r" option will read in and interpret the file as having characters only or having both characters and color attributes based on the size of the specified text file. The interpretation will be based as follows: 25-line mode 4098 bytes: (82 bytes/row) * (25 rows) * 2 (for and above character and color attributes). Why 82 bytes/row instead of 81 is that a text editor will place two characters (a and a ) in the file when the [enter] key is pressed. This resultant size will actually work out to be 4101 bytes. Three bytes are taken off the file size in case the last / and the end-of-file marker is not added on. 2048 to : (82 bytes/row) * (25 rows). Only 4097 bytes characters will be read from the specified text file. 43-line mode 7050 bytes: (82 bytes/row) * (43 rows) * 2 Both and above characters and color attributes will be read from the specified text file. 3524 to : (82 bytes/row) * (43 rows). Only 7049 bytes characters will be read from the specified text file. 50-line mode 8198 bytes: (82 bytes/row) * (50 rows) * 2. Both and above character and color attributes will be read from the specified text file. 4098 to : (82 bytes/row) * (50 rows). Only 8197 bytes characters will be read from the specified text file. Since some people have a "beta" version of this bin file a listing of the changes and fixes have been provided. Version 1.1b - Changes and Fixes. 1. Bug fix regarding reading the color attributes. Reading in a file with color attributes to write to the screen resulted in the color attributes being read in, but shifted one column to the left on the screen. The text would appear normal on the screen but it's color attribute would appear column to the left of the text. This bug has been fixed. 2. At the DOS-prompt type "type screen.bin" to see the version number- thanks goes to Keith Mund for presenting this idea to me. Version 1.2 - Changes. 1. Screen.bin can now be called with the call() function, and will pass back an error/success code to dBASE IV. The error codes are assigned as follows; 1: Product is not dBASE IV (you should never see this error code, let me know if you do). 2: Lines on screen are not set to 25, 43, or 50. 3: First parameter was not a "W","w","R","r","A", or an "a". 4: Unable to open file, the file does not exist, was previously opened or the path was mispelled . 5: File is too small to read, for the current line mode. 6: Unable to position a file pointer for a file read. 7: Error occured during a file read. 8: file already exists (happens with the "W","W-","w" or "w-" option). 9: Unable to create the file (happens with the "W","W-","w","w-" and the "A" and "a" options). A: Unable to position a file pointer for a file write. B: Error occured during a file write. C: File failed to close. Version 1.2b - Fixes 1. Minor corrective coding change provided to ensure proper embedding of carriage return/linefeeds and end of file markers in the output file. Version 1.2c - Changes 1. Just a change in what the copyright says when a "type screen.bin" writes when executed from a dos-prompt. Nothing else has changed. Further Enhancements: If you like this piece of software or think it could be enhanced in a certain fashion please contact him. Any further advancement of this bin file will be proportional to it's use AND the response for enhancement of those who use it. The author can be contacted by E-mail on the Ashton Tate BBS at; 1200 BAUD (213)538-6196 2400 BAUD (213)324-2188 or on Compuserv (for free access use this route), at the "Host Name:" prompt type "ATBBS" Please leave E-mail for the user name of Plpowers. Special thanks goes to those who were part of the beta-testing on this bin file, they are; Judy Maske Dan Madoni Roger Bowman Thanks very much guys ! And lastly thank you very much, and enjoy !